'use strict';

const Controller = require('egg').Controller;

module.exports = class extends Controller {
  async index() {
    // this.ctx.body = 'hello';
    await this.ctx.render('hello', {
      data: 'world',
    });
  }
  async test() {
    let data = await this.app.mysql.query("select itemid,title from article order by itemid desc limit 3");
    console.log(data);

    this.ctx.body = 'test';
  }

}